﻿using System.Linq;
using Rhinestone.Shared.Repository;

namespace LinqRepositorySample.Domain
{
    public static class OrderSpecifications
    {
        public static Specification<Order> OrdersWithHighValue ()
        {
            return new Specification<Order>(order => order.OrderDetails.Sum(
                                                                                detail => detail.Total
                                                                            ) > 200);
        }
    }
}
